<?php
namespace app\api\controller;

use app\BaseController;
use app\common\model\mysql\CommonSysOtherConfig as models;

class System extends BaseController
{

    public function initialize()
    {
    }

    /*
     * 用户协议
     */
    public function userRule(){
        $data = [
            'rule' => models::where(['id'=>1])->value('user_rule')
        ];
        jsonSuccess($data);
    }

    /*
     * 隐私协议
     */
    public function privateRule(){
        $data = [
            'rule' => models::where(['id'=>1])->value('private_rule')
        ];
        jsonSuccess($data);
    }

    /*
     * 提现规则
     */
    public function presentRule(){
        $data = [
            'rule' => models::where(['id'=>1])->value('present_rule')
        ];
        jsonSuccess($data);
    }

    /*
     * 加载系统银行卡信息
     */
    public function bankDetail(){
        $model = models::where(['id'=>1])->find();
        $data = [
            'id_name' => $model['id_name'],
            'id_account' => $model['id_account'],
            'id_number' => $model['id_number']
        ];
        jsonSuccess($data);
    }

}
